Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
colors.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Roc authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_core/target_posix/roc_core/colors.h
10//! @brief Colorization functions.
11
12#ifndef ROC_CORE_COLORS_H_
13#define ROC_CORE_COLORS_H_
14
15#include "roc_core/log.h"
16#include "roc_core/stddefs.h"
17
18namespace roc {
19namespace core {
20
21//! Check if current stderr is connected to a tty.
23
24//! Fill colored str into buf according to the log level.
25bool format_colored(LogLevel level, const char* str, char* buf, size_t bufsz);
26
27} // namespace core
28} // namespace roc
29
30#endif // ROC_CORE_COLORS_H_
Logging.
bool format_colored(LogLevel level, const char *str, char *buf, size_t bufsz)
Fill colored str into buf according to the log level.
bool colors_available()
Check if current stderr is connected to a tty.
Root namespace.
LogLevel
Log level.
Definition: log.h:31
Commonly used types and functions.